<?php 
session_start();
?>
<?php require_once('Conection_DataBase.php') ?>
<?
mysql_select_db($database_jssue, $jssue);
$idStuAsig = $_SESSION["codId"];
		$Querry_recordSetAlum = "select cllg_student.FIRST_NAME,cllg_student.SECOND_NAME,cllg_student.LAST_NAME,cllg_career.NAME,cllg_student_assign.FK_CYCLE from cllg_student,cllg_career,cllg_student_assign where cllg_student_assign.ID = '$idStuAsig' and cllg_student_assign.FK_STUDENT = cllg_student.ID and cllg_student_assign.FK_CAREER = cllg_career.ID";
		$recordsetAlum = mysql_query($Querry_recordSetAlum, $jssue) or die(mysql_error());
		$rowRecordsetAlum=mysql_fetch_assoc($recordsetAlum);
		
		$Querry_recordSetCurso = "select * from cllg_assign_detail,cllg_courses_catalog where cllg_assign_detail.FK_ASSIGN = '$idStuAsig' and cllg_assign_detail.FK_COURSE = cllg_courses_catalog.CODE and cllg_assign_detail.APROVED = 1";
		$recordsetCurso = mysql_query($Querry_recordSetCurso, $jssue) or die(mysql_error());

$Fec = date('d-m-Y');
?>
<script>
function window.onbeforeprint(){
noprint.style.visibility = 'hidden';
noprint.style.position = 'absolute';
}
function window.onafterprint(){
noprint.style.visibility = 'visible';
noprint.style.position = 'relative';
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Certificacion de Cursos aprovados</title>
<link href="css/print.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="wrap">

  <div id="header">  </div>
  <div id="content">
<h2>Certificacion de Cursos Aprobados </h2>
<table width="296">
  <tr>
    <td id="noprint"><input name="imprimir" type="button" onClick="window.print();" value="Imprimir" />
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="14%">Nombre Alumno:</td>
    <td width="28%"><?PHP echo $rowRecordsetAlum['FIRST_NAME'];?> <?PHP echo $rowRecordsetAlum['SECOND_NAME'];?> <?PHP echo $rowRecordsetAlum['LAST_NAME'];?></td>
    <td width="6%">Carrera:</td>
    <td width="33%"><?PHP echo $rowRecordsetAlum['NAME'];?></td>
    <td width="19%" colspan="4">Ciclo: <?PHP echo $rowRecordsetAlum['FK_CYCLE'];?></td>
    </tr>
  <tr>
    <td colspan="8"><table width="100%" border="0">
        <tr>
          <td width="19%">Codigo Curso:</td>
          <td width="32%">Nombre Curso :</td>
          <td width="40%">Nota Final: </td>
          </tr>
        <?PHP while ($rowRecordsetCurso=mysql_fetch_assoc($recordsetCurso)){?><tr>
          <td><?PHP echo $rowRecordsetCurso['CODE'];?></td>
          <td width="32%"><?PHP echo $rowRecordsetCurso['NAME'];?></td>
          <td width="40%"><?PHP echo $rowRecordsetCurso['SCORE'];?></td>
        </tr><?php }?>
      </table></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td colspan="4" rowspan="2">&nbsp;</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
  </table>
<hr />
</div>
<div id="footer">CINDE  - Generado el <?PHP echo $Fec;?></div>
</div>
</body>
</html>